import '../globals.css'
import { dir } from 'i18next'
import { languages } from '../i18n/settings'
import Providers from './Providers'
import { useTranslation } from '../i18n'
import Script from 'next/script'

export async function generateStaticParams() {
  return languages.map((lng) => ({ lng }))
}
export default async function RootLayout({ 
  children,
  params: { lng }
}) {
  const { t } = await useTranslation(lng)
  const menus = [
    {
        title: t('topNav.personAi'),
        href: "/",
        isActive: true
    },
    {
        title: t('topNav.enterpriseAi'),
        href: "/"
    },
    {
        title: t('topNav.AIMarket'),
        href: "/"
    },
    {
        title: t('topNav.AICourse'),
        href: "/"
    },
    {
        title: t('topNav.price'),
        href: "/"
    },
    {
        title: t('topNav.more'),
        item: [
          {
            title: "关于我们",
            description: "专业团队，提供优质服务",
            href: "/"
          }
        ]
    }
  ]
  return (
    <html lang={lng} dir={dir(lng)}>
      <link
        rel="stylesheet"
        href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
      />
      <body>
        <Providers>
          {/* <CTopNav lng={lng} menus={menus}></CTopNav> */}
          {children}
          {/* <Footer lng={lng}></Footer> */}
        </Providers>
      </body>
    </html>
  )
}
